
import VueRouter from 'vue-router'

import vip from './components/tabbar/vip.vue'

import shopcar from './components/tabbar/shopcar.vue'

import home from './components/tabbar/home.vue'

import search from './components/tabbar/search.vue'

import newlist from './components/news/newlist.vue'

import newsinfo from './components/news/newsinfo.vue'

import photolist from './components/photo/photolist.vue'

import photoinfo from './components/photo/photoinfo.vue'

import goods from './components/goods/goods.vue'

import goodinfo from './components/goods/goodinfo.vue'

import goodsintroduce from './components/goods/goodsintroduce.vue'

import goodscomments from './components/goods/goodscomments.vue'

import video from './components/videos/videolist.vue'

import contact from './components/contact/contact.vue'

import messages from './components/messages/messages.vue'

var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: home },
        { path: '/vip', component: vip },
        { path: '/shopcar', component: shopcar },
        { path: '/search', component: search },
        { path: '/home/news', component: newlist },
        { path: '/home/newsinfo/:id', component: newsinfo },
        { path: '/home/photo', component: photolist },
        { path: '/home/photo/photoinfo/:id', component: photoinfo },
        { path: '/home/goods', component: goods },
        { path: '/home/goods/goodinfo/:id', component: goodinfo, name: 'goodinfo' },
        { path: '/home/goods/goodsintroduce/:id', component: goodsintroduce, name: 'goodsintroduce' },
        { path: '/home/goods/goodscomments/:id', component: goodscomments, name: 'goodscomments' },
        { path: '/home/videos', component: video },
        { path: '/home/contact', component: contact },
        { path: '/home/messages', component: messages }

    ],
    linkActiveClass: 'mui-active'  //覆盖默认的路由高亮类
})

export default router